import json
from enum import Enum
from os.path import dirname, abspath, join

ROOT_PATH = dirname(dirname(dirname(abspath(__file__))))
CONFIG_PATH = join(ROOT_PATH, 'conf', 'plugins.json')
PLUGIN_PARAMETER = {
    'project_path': ROOT_PATH
}
RAG_CONCURRENCY = 5

with open(CONFIG_PATH, 'r', encoding='utf-8') as file:
    PLUGIN_CONFIG = json.load(file)


class ToolName(Enum):
    # 召回知识相关性二次检查
    RELATION_CHECK = 'main_relation_check'

    # RAG
    RAG = 'main_rag'

    # 问题分类
    QES_CLASSIFICATION = 'question_classification'

    # Rerank
    RERANK = 'rerank'
